/**
 安全管理-缺失管理接口
 **/
import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

/**
 安全管理-缺失管理接口
 **/
// 查询缺失管理接口
export const queryDefect = (data?: object) => {
  return http.request<ResultTable>("post", "/digitaltwins/api/v1/missing/query", {
    data
  });
};
// 获取缺失管理详情接口
export const getDefect = (data?: object) => {
  return http.request<Record<string, any>>("post", "/digitaltwins/api/v1/missing/get", {
    data
  });
};
// 上报缺失管理接口
export const reportDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/report", {
    data
  });
};
// 编辑缺失管理接口
export const editDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/update", {
    data
  });
};
// 整改缺失管理接口
export const rectifyDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/rectify", {
    data
  });
};
// 获取缺失管理枚举接口
export const getEnumDefect = (data?: Record<string, any>) => {
  return http.request("get", "/digitaltwins/api/v1/missing/enum/query", {
    data
  });
};
// 获取缺失编号接口
export const getMissingId = (data?: object) => {
  return http.request("get", "/digitaltwins/api/v1/missing/getMissingId", {
    data
  });
};
// 延期整改接口
export const delayRectifyDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/rectify/delay", {
    data
  });
};
// 变更整改状态接口
export const changeRectifyStatusDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/rectify/status/update", {
    data
  });
};
// 回复整改时间接口
export const replyRectifyDateDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/rectify/time/update", {
    data
  });
};
// 缺失分析
export const analysisDefect = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/missing/analysis", {
    data
  });
};
